import type { RouteRecordRaw } from 'vue-router'

const routes: RouteRecordRaw[] = [
  {
    path: '/main',
    name: 'main',
    component: () => import('@/components/global/AppLayout'),
    redirect: '/main/home?menu=home',
    meta: {  },
    children: [
      {
        path: '/main/home',
        name: 'home',
        component: () => import('./home/home.view'),
        meta: { title:"首页" },
      }, {
        path: '/main/workflow/design/:id',
        name: 'BpmnDesingerView',
        component: () => import('./workflow/BpmnDesingerView'),
        meta: { title:"流程设计" },
      }, {
        path: '/main/workflow/definitions',
        name: 'DefinitionListView',
        component: () => import('./workflow/DefinitionListView'),
        meta: { title:"流程定义" },
      }, {
        path: '/main/workflow/processinsts',
        name: 'proinstlist',
        component: () => import('./workflow/ProcessInstListView'),
        meta: { title:"流程实例" },
      }, {
        path: '/main/workflow/todotasks',
        name: 'TodoTaskListView',
        component: () => import('./workflow/TodoTaskListView'),
        meta: { title:"待办任务" },
      }, {
        path: '/main/userprms/prms/list',
        name: 'PrmsListView',
        component: () => import('./userprms/PrmsListView'),
        meta: { title:"权限列表" },
      }, {
        path: '/main/userprms/role/list',
        name: 'RoleListView',
        component: () => import('./userprms/RoleListView'),
        meta: { title:"角色列表" },
      }, {
        path: '/main/userprms/role/detail/:id',
        name: 'RoleDetailView',
        component: () => import('./userprms/RoleListView/RoleDetailView'),
        meta: { title:"角色详情" },
      }, {
        path: '/main/userprms/user/list',
        name: 'UserListView',
        component: () => import('./userprms/UserListView'),
        meta: { title:"用户列表" },
      }, {
        path: '/main/userprms/user/detail/:id',
        name: 'UserDetailView',
        component: () => import('./userprms/UserListView/UserDetailView'),
        meta: { title:"用户详情" },
      }, {
        path: '/main/other/bpmntest',
        name: 'bpmntest',
        component: () => import('./other/BpmnTestView'),
        meta: { title:"BPMN测试1" },
      }, {
        path: '/main/other/bpmndesigner',
        name: 'bpmndesigner',
        component: () => import('./other/BpmnDesigner'),
        meta: { title:"BPMN测试2" },
      }, {
        path: '/main/other/bpmndesigner1',
        name: 'bpmndesigner1',
        component: () => import('./other/BpmnDesinger1'),
        meta: { title:"BPMN测试3" },
      }, {
        path: '/main/other/count',
        name: 'count',
        component: () => import('./other/count/count.view'),
        meta: { title:"计数" },
      }, {
        path: '/main/other/table/:info',
        name: 'table',
        component: () => import('./other/table/table.view'),
        meta: { title:"动态表格" },
      }, {
        path: '/main/other/test',
        name: 'test',
        component: () => import('./other/test/test.view'),
        meta: { title:"测试" },
      }, {
        path: '/main/other/formDesigner',
        name: 'formDesigner',
        component: () => import('./datamodel/FormDesigner'),
        meta: { title:"表单设计器" },
      }
    ],
  },
]

export default routes
